package net.sunofbeach.blog.response;

import lombok.Getter;

/**
 * 统一状态码
 *
 * @author bing_  @create 2021/11/25-19:48
 */
@Getter
public enum ResultEnum {

    /**
     * 全局统一状态码
     */
    SUCCESS(20000, "操作成功"),
    LOGIN_SUCCESS(20001,"登录成功"),
    REGISTER_SUCCESS(20002,"注册成功"),

    FAIL(40000, "操作失败"),
    GET_RESOURCE_FAIL(40001,"获取资源失败"),
    ACCOUNT_NOT_LOGIN(40002,"账号未登录"),
    PERMISSION_DENIED(40003, "权限不足，请联系管理员"),
    ACCOUNT_DISABLED(44444,"该账号已被禁用"),
    LOGIN_FAIL(49999, "登录失败"),

    ERROR_403(40033,"权限不足"),
    ERROR_404(40004,"页面已丢失"),
    ERROR_405(40005,"权限不足"),
    ERROR_504(40055,"系统繁忙，请稍后重试"),
    ERROR_505(40555,"请求参数错误"),

    ;

    private Integer code;
    private String message;

    private ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
